package com.farewell.blog.pojo;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Farewell
 * @date 2021/2/1
 * <p>
 * 用户类
 */
@Data
@TableName("t_user")
public class User implements Serializable {
    @TableId(type = IdType.ID_WORKER)
    private long id;
    private String nickname;
    private String username;
    private String password;
    private String email;
    @TableField(value = "createTime")
    private Date createTime;
    @TableField(value = "updateTime")
    private Date updateTime;
    private String authority;

    public User() {
    }

    public User(long id, String nickname, String username, String password, String email, Date createTime, Date updateTime, String authority) {
        this.id = id;
        this.nickname = nickname;
        this.username = username;
        this.password = password;
        this.email = email;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.authority = authority;
    }
}
